package com.origin.oss.solution.ali.config;

import cn.hutool.core.text.CharSequenceUtil;
import com.origin.oss.util.OssPathUtils;
import lombok.Data;

/**
 * @author yezh
 * @date 2024/2/21 19:17
 */
@Data
public class AliOssConfig {

    /**
     * 数据存储路径
     */
    private String basePath;

    /**
     * Bucket 名称
     */
    private String bucketName;

    /**
     * OSS 地址
     */
    private String endpoint;

    /**
     * AccessKey ID
     */
    private String accessKeyId;

    /**
     * AccessKey Secret
     */
    private String accessKeySecret;

    private String securityToken;

    private AliOssClientConfig clientConfig;

    public void setBasePath(String basePath) {
        if (CharSequenceUtil.isNotBlank(basePath)) {
            this.basePath = OssPathUtils.valid(basePath);
        }
    }

}
